package com.mjlf.test_shiro.controller;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @ClassName: UnAuthController
 * @Author: majun
 * @CreateDate: 2018/10/17 17:05
 * @Version: 1.0
 * @Description: TODO
 */
@RestController
@RequestMapping("/test_shiro")
@EnableSwagger2
public class UnAuthController {

    @ApiOperation(value = "未登录接口",notes = "未登录提升")
    //返回结果中无法做到不返回指定字段
    @ApiResponses({
            @ApiResponse(code = 200, message = "I don't know what message", response = String.class)
    })
    @RequestMapping(path = "/unauth", method = RequestMethod.GET)
    public String unAuth(){
        return "你没有登录";
    }
}
